
//  UnderWayTBVCell.m
//  XJMCustomer
//  Created by Mr.hu on 2017/10/13.
//  Copyright © 2017年 Mr.hu. All rights reserved.

#import "UnderWayTBVCell.h"

@implementation UnderWayTBVCell

- (void)setData:(NSDictionary *)dic{
    /*
    OrderListNumber; //订单号 OrderImageHead; //头像  OrderItemName; //项目名称  OrderTechnicianName; //技师名字  OrderTechnicianNumber; //技师电话
     */
    
    if (dic[@"goods_name"]) {
        self.OrderItemName.text = dic[@"goods_name"];
    }
    
    if (dic[@"goods_image"]) {
        NSString * codestr = [dic[@"goods_image"] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
        [self.OrderImageHead sd_setImageWithURL:[NSURL URLWithString:codestr] placeholderImage:[UIImage imageNamed:@"touxiang"]];
    }
    
    if (dic[@"headurl"]) {
        NSString * codestr = [dic[@"headurl"] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
        [self.OrderImageHead sd_setImageWithURL:[NSURL URLWithString:codestr] placeholderImage:[UIImage imageNamed:@"touxiang"]];
    }
    
    self.OrderListNumber.text = [NSString stringWithFormat:@"订单号 : %@", dic[@"order_sn"]];
    
    if (dic[@"refund_money"]) {
        self.OrderTotalPrice.text =  [NSString stringWithFormat:@"总计 ：¥%@",dic[@"refund_money"]];
    }
    
    if (dic[@"order_amount"]) {
        self.OrderTotalPrice.text =  [NSString stringWithFormat:@"总计 ：¥%@",dic[@"order_amount"]];
    }
    
    
    
    if (dic[@"mobile"]) {
        self.OrderTechnicianName.text = [NSString stringWithFormat:@"电话:%@",dic[@"mobile"]];
    }
    
    
    if (dic[@"refund_reason"]) {
        self.OrderTechnicianNumber.text = [NSString stringWithFormat:@"退款原因:%@",dic[@"refund_reason"]];
    }else if (dic[@"user_note"]) {
        self.OrderTechnicianNumber.text = [NSString stringWithFormat:@"留言:%@",dic[@"user_note"]];
    }else if (dic[@"content"]){
        self.OrderTechnicianNumber.text = [NSString stringWithFormat:@"评价:%@",dic[@"content"]];
    }else{
        self.OrderTechnicianNumber.text = @"";
    }
}

@end
